﻿<?php
require_once("include/common.inc.php");
require_once("include/dedesql.class.php");
$id = $_GET["id"];
$id = isset($id) && is_numeric($id) ? $id : 0;
if($id == 0){
	echo 'ERROR';
	exit;
}

$getRow = $dsql->GetOne("select * From cms_archives a, cms_addonarticle b where a.id = '".$id."' and a.id = b.aid");

//计数
$sql = "update cms_archives set click = click+1 where id = '".$id."' limit 1";
$dsql->ExecuteNoneQuery($sql);

$title = '法治天下 - ' . $getRow['title'];

//得到所属栏目
$tmp = $dsql->GetOne("select * from cms_arctype where id = '".$getRow['typeid']."' limit 1");
$path2 = "<a href=\"/content-list.php?tid=".$tmp['id']."\" target=\"_blank\" style=\"color:#2263AC\">" . $tmp['typename'] . "</a>";

require_once('common/header.php');
?>
<div class="index_box clearfix">
	<div class="left_info">
<!--- 法治时评  start------>
		<div class="cn_box01" <?if(strlen($getRow['body']) < 200){?>style="height:821px"<?}?>>
			<table border='0' width="690">
				<tr>
					<td style="font-size:14px;margin-top:10px;padding-left:10px;color:#2263AC" align="left" height="35">
					<a href="/index.php" style="color:#2263AC">法治天下</a> >> <?=$path2?> >> <?=$getRow['title']?>
					</td>
				</tr>
				<tr>
					<td style="font-size:20px;margin-top:20px;color:#000000" align="center" height="35"><h2><?=$getRow['title']?></h2></td>
				</tr>
				<?php
					if(trim($getRow['shorttitle']) != ''){
				?>
				<tr>
					<td style="font-size:16px; color:#000000" align="center" height="35"><?=$getRow['shorttitle']?></td>
				</tr>
				<?
					}
				?>
				<tr>
					<td height="20" style="height:24px;line-height:20px;text-align:center;color:#666">
						发表时间:&nbsp;<?=date("Y年m月d日 H:i", $getRow['senddate'])?>&nbsp;&nbsp;
						<? if($getRow['source'] != '未知'){echo '来源:' . $getRow['source'].'&nbsp;&nbsp;';}?>
						<? if($getRow['writer'] != 'admin'){echo '作者:' . $getRow['writer'].'&nbsp;&nbsp;';}?>
						点击: <?=$getRow['click']?> 次
					</td>
				</tr>
				<tr>
					<td valign="top" align="left" style="padding:5px 15px 0px 15px;font-size:14px;line-height:25px;color:#333;font:14px Verdana,Arial,Tahoma">
					<?=$getRow['body']?>
					</td>
				</tr>
			</table>
			<br>
		</div>
<!--- end------>
		<div class="height_3"></div>
	</div>
	<div class="right_info">
		<?php
		require_once('common/right.php');
		?>
	</div>
</div>
<?php
require_once('common/footer.php');
?>